<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/context/mytags.jsp"%>
<div class="table-scrollable">
	<div style="margin-top: 20px;"></div>

	<table class="table table-striped table-hover table-info">
		<thead style="background-color: red;">
			<tr>
				<th>商品编号</th>
				<th>商品名称</th>
				<th>仓库</th>
				<th>合理库存量</th>
				<th>预警上限</th>
				<th>预警下限</th>
				<th>备注</th>
				<th>状态</th>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach items="${safeWarnings }" var="safeWarning" varStatus="vs">
				<tr>
					<td>${safeWarning.stock.product.code }</td>
					<td>${safeWarning.stock.product.name }</td>
					<td>${safeWarning.stock.warehouse.name }</td>
					<td>${safeWarning.reasonableStock }</td>
					<td>${safeWarning.warningMax }</td>
					<td>${safeWarning.warningMin }</td>
					<td>${safeWarning.description}</td>
					<td><c:if test="${empty safeWarning.isNormal }">
							<img alt="警告" title="警告" style="margin-top: -4px;"
								src="${webRoot}/static/global/img/invalid.png">
						</c:if> <c:if test="${not empty safeWarning.isNormal }">
							<img alt="正常" title="正常" style="margin-top: -4px;"
								src="${webRoot}/static/global/img/valid.png">
						</c:if></td>
					<td><a href="javascript:;" class="btn btn-sm blue"
						onclick="update('/safeWarning/safeWarning?id=${safeWarning.id}')"> <i
							class="fa fa-edit"></i>编辑</a><a class="btn btn-sm red"
						href="javascript:;"
						onclick="del('/safeWarning/delete?id=${safeWarning.id}')"> <i
							class="fa fa-trash"></i>删除</a></td>
				</tr>
			</c:forEach>
		</tbody>
	</table>

</div>
<div class="pageination-panel">${page}</div>